<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2011-06-30T11:22:21" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" version="1.0">
	<xsl:output encoding="UTF-8" method="xml"/>
	<xsl:template match="/">
		<xsl:copy-of select="processing-instruction() | comment()"/>
		<xsl:choose>
			<xsl:when test="my:myFields">
				<xsl:apply-templates select="my:myFields" mode="_0"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="var">
					<xsl:element name="my:myFields"/>
				</xsl:variable>
				<xsl:apply-templates select="msxsl:node-set($var)/*" mode="_0"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="my:OrderInfoList" mode="_1">
		<xsl:copy>
			<xsl:element name="my:OrderName">
				<xsl:copy-of select="my:OrderName/text()[1]"/>
			</xsl:element>
			<xsl:element name="my:UserName">
				<xsl:copy-of select="my:UserName/text()[1]"/>
			</xsl:element>
			<xsl:element name="my:ID">
				<xsl:copy-of select="my:ID/text()[1]"/>
			</xsl:element>
		</xsl:copy>
	</xsl:template>
	<xsl:template match="my:myFields" mode="_0">
		<xsl:copy>
			<xsl:element name="my:CustomName">
				<xsl:copy-of select="my:CustomName/text()[1]"/>
			</xsl:element>
			<xsl:element name="my:ID">
				<xsl:copy-of select="my:ID/text()[1]"/>
			</xsl:element>
			<xsl:choose>
				<xsl:when test="my:OrderInfoList">
					<xsl:apply-templates select="my:OrderInfoList" mode="_1"/>
				</xsl:when>
				<xsl:otherwise>
					<xsl:variable name="var">
						<xsl:element name="my:OrderInfoList"/>
					</xsl:variable>
					<xsl:apply-templates select="msxsl:node-set($var)/*" mode="_1"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:copy>
	</xsl:template>
</xsl:stylesheet>